package org.framework.test.controller;

import org.framework.test.entity.Producer;
import org.framework.test.util.CommonResult;
import org.framework.test.util.ResultEnum;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * <p>Title:ProducerController.java</p >
 * <p>Description: </p >
 * <p>Copyright: Copyright(c)2020</p >
 * <p>Date:2021/5/29 14:52</p >
 *
 * @author quzp
 * @version 1.0
 */
@RestController
@RequestMapping(value = {"/producer"})
public class ProducerController {

    /**
     * 测试接口
     * @return
     */
    @GetMapping(value = {"/method"})
    public CommonResult<Producer> feignMethod(){
        Producer producer = new Producer(1L, "no001", "生产1");
        return new CommonResult<>(ResultEnum.SUCCESS.code,ResultEnum.SUCCESS.message,producer);
    }
}